package com.hmall.mapper;

import com.hmall.model.MallOrder;
import com.hmall.model.SysDept;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;
@Repository
public interface SysDeptMapper extends MyMapper<SysDept> {

    List<Map<String, Object>> queryName(@Param("subName") String subName);

    List<SysDept> selectALLDept();

    Integer selectIdByName(@Param("name") String name);


    List<SysDept> selectMyDept(@Param("dept_id") Integer dept_id);

    Integer selectDeptIdByCustomerId(@Param("customer_id") Integer customer_id);

    List<SysDept> selectByMonth(@Param("dealer_id") Integer dealer_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<SysDept> selectDealerDept(@Param("dealer_id") Integer dealer_id);

    List<SysDept> selectSalesManDept(@Param("user_id") Integer user_id);

    Integer selectIdByName2(@Param("bus_name") String bus_name);

    Integer selectParentId(@Param("dept_id") Integer dept_id);

    SysDept selectByName(@Param("name") String name);

    Integer selectIdByName3(@Param("name") String name);
}